"""
#!!===========================================================
#版权（C）2023, Huawei Technologies Co., HUTAF xDevice
#!!===========================================================
#用例编号:      
#用例名称:      
#用例作者:
#修改说明:
#!!===========================================================
"""

# -*- coding: utf-8 -*-
from devicetest.core.test_case import TestCase
from devicetest.aw.OpenHarmony import CommonOH

from aw.Useriam.AuthWidget import SecurityUserIamAuthWidgetHapApi
from aw.Useriam.PinAuth import SecurityUserIamPinAuthApi


class A_Security_IAM_AuthWidget_Face_Auth_Func_start(TestCase):

    def __init__(self, controllers):
        self.TAG = self.__class__.__name__
        self.tests = [
             #"test_step1"
        ]
        TestCase.__init__(self, self.TAG, controllers)

    def setup(self):
        print("预置工作：初始化手机开始............" + self.devices[0].device_sn)
        print("预置工作：设置6位口令为111111.........")
        print("预置工作：录入人脸")
        SecurityUserIamAuthWidgetHapApi.setVerifyResults(self.device1, 0)
        SecurityUserIamAuthWidgetHapApi.closeselinux(self.device1)
        CommonOH.wake(self.device1)
        CommonOH.shell(self.device1, "hdc shell power-shell setmode 602")
        SecurityUserIamPinAuthApi.setPIN(self.device1, "111111")
        CommonOH.goHome(self.device1)
        SecurityUserIamAuthWidgetHapApi.setface(self.device1)
        CommonOH.goHome(self.device1)
